// ////////////////////////////////////////////////////////////////////////////////////////
// NAME: Settings.java 
// AUTHOR: CDT Riley Mckenna 
// LAST MODIFIED: 28 March 2012 
// DESCRIPTION: Starts Nullwall
// LIMITATIONS: 
// CITATIONS: In code
// 
// ////////////////////////////////////////////////////////////////////////////////////////
package prototype.revision;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class Settings extends TabActivity {
	/** Called when the activity is first created. */
	private Intent intent;
	private TabHost myHost;
	private TabSpec mySpec;
	private Resources resource;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settingsbasic);

		resource = this.getResources();
		myHost = this.getTabHost();

		// General page
		intent = new Intent().setClass(this, GeneralSettings.class);
		mySpec = myHost
				.newTabSpec("general")
				.setIndicator("General",
						resource.getDrawable(R.drawable.ic_menu_star))
				.setContent(intent);
		myHost.addTab(mySpec);
		//Log.i(TAG, "General Page Tab Created with Intent.");

		// General Detection Settings
		intent = new Intent().setClass(this, DetectionSettings.class);
		mySpec = myHost
				.newTabSpec("detectionSettings")
				.setIndicator("Detection",
						resource.getDrawable(R.drawable.ic_tab_learnmode))
				.setContent(intent);
		myHost.addTab(mySpec);
		//Log.i(TAG, "FireWall Tab Created with Intent.");
		
		myHost.setCurrentTab(0);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.menu, menu);
		//Log.i(TAG, "Menu Opened.");
		return true;
	}

}

